<?php
namespace Modules\Shop\Database\factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Modules\Shop\Models\SpecValue;

class AttrFactoryFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = \Modules\Shop\Models\AttrFactory::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        $av = SpecValue::all();
        return [
            'attr_val_id' => $av->random(1)->first()->id
        ];
    }
}

